package org.dromara.xxmj.domain.model;

import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.Pattern;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.dromara.common.core.domain.model.LoginBody;
import org.dromara.common.core.domain.model.RegisterBody;
import org.hibernate.validator.constraints.Length;

/**
 * 小巷密卷用户注册对象
 *
 * @author Lion Li
 */
@Data
@EqualsAndHashCode(callSuper = true)
public class XxmjRegisterBody extends LoginBody {

    private Long userId;

    /**
     * 用户分类（1专升本 2单招）
     */
    @NotBlank(message = "用户分类不能为空")
    private String userCategory;

    /**
     * 手机号码
     */
    @NotBlank(message = "手机号码不能为空")
    @Length(min = 11, max = 11, message = "手机号码长度不正确")
    @Pattern(regexp = "^1[3-9]\\d{9}$", message = "手机号码格式不正确")
    private String phoneNumber;

    /**
     * 用户密码
     */
    @NotBlank(message = "{user.password.not.blank}")
    @Length(min = 5, max = 20, message = "{user.password.length.valid}")
    private String password;

    /**
     * 确认密码
     */
    @NotBlank(message = "{user.password.not.blank}")
    private String confirmPassword;


    @NotBlank(message = "{user.username.not.blank}")
    private String username;
}
